History Component Overview
In our system, the History component acts as the central access point for all user chat data, allowing users to efficiently navigate and manage past conversations.
What is the History Component?
The History component in the JeenAI platform is a robust chat management interface. It transforms a collection of raw chat sessions into a dynamic, user-friendly archive - enabling users to search, organize, and interact with their chat history through intelligent filtering, metadata management, and context-aware session loading.
Core Features
Search & Discovery
- Real-time Search - Find conversations instantly by typing keywords or phrases
- Smart Suggestions - Get search recommendations based on previous queries
- Category Filtering - Filter conversations by custom categories and tags
Chat Session Management
- Pin Important Chats - Keep frequently accessed conversations at the top
- Rename Sessions - Give meaningful titles to your conversations for easy identification
- Delete Conversations - Remove unwanted chat sessions permanently
- Expand Details - View conversation history and multiple question versions
Organization & Navigation
- Chronological Sorting - Conversations sorted by date with pinned items prioritized
- Recent Chat Indicator - Clearly identify your most recent conversation
- Category Management - Create, edit, and delete custom categories
- Infinite Scrolling - Seamlessly load more conversations as you scroll
How It Works
- Load Your History - The component fetches your chat sessions from the server with pagination support
- Browse & Search - Use the search bar or category filters to find specific conversations
- Select a Conversation - Click on any chat to load its complete context and continue the discussion
- Manage Your Sessions - Use the 3-dots menu to rename, pin, categorize, or delete conversations
- Expand for Details - View conversation variants and timestamps for complex chat histories
API Endpoints
Chat Management
Endpoint | Method | Purpose |
---|
/api/v1/chats/get-history-chats | PUT | Fetch paginated list of user chat sessions with search and filter support |
/api/v1/chats/{chatId} | GET | Retrieve detailed conversation data for a specific chat |
/api/v1/chats/update-chat-id | POST | Create or update chat session with title |
/api/v1/chats/rename-chat-title | PUT | Update the title of a specific chat session |
/api/v1/chats/update-pinned-status | PUT | Toggle the pinned status of a conversation |
/api/v1/chats/delete-chat | POST | Permanently remove a chat session from user history |
/api/v1/chats/delete-chat-logs | POST | Delete all logs associated with a chat session |
Category Management
Endpoint | Method | Purpose |
---|
/api/v1/chats/update-chat-categories | PUT | Update categories assigned to a specific chat |
/api/v1/user/get-user-categories | PUT | Fetch all user-defined categories |
/api/v1/user/update-user-categories | PUT | Create, update, or delete user categories |
Search & Suggestions
Endpoint | Method | Purpose |
---|
/api/v1/logs/get-history-search-logs | PUT | Retrieve user's search history and suggestions |
/api/v1/logs/save-history-search-log | POST | Save a new search query to user's history |
/api/v1/logs/update-history-search-log-pinned | PUT | Pin or unpin a search suggestion |
/api/user/get-search-suggestions | PUT | Get search suggestions for autocomplete |
/api/user/update-search-suggestions | PUT | Update user's search suggestions |
Legacy Support
Endpoint | Method | Purpose |
---|
/api/logs/get-logs-history | PUT | Fetch logs history with filtering (legacy) |
/api/logs | POST | Save log as chat (legacy) |